package be.darling.scrt.statistics;

import be.darling.scrt.data.Condition;
import be.darling.scrt.data.Observation;
import be.darling.scrt.data.Randomization;

import java.util.HashMap;
import java.util.Iterator;

/**
 * Created by IntelliJ IDEA.
 * User: geert
 * Date: Nov 22, 2007
 * Time: 1:48:25 PM
 * To change this template use File | Settings | File Templates.
 */
public class MeansDifference extends SimpleStatistic{

    public MeansDifference()
    {}

    public double calc(Randomization randomization){ // return Comparable object? {        
        //return Math.abs(randomization.getMeans(label1).getMean() - randomization.getMeans(label2).getMean());
        double diff =randomization.getMeans(getLabel1()).getMean() - randomization.getMeans(getLabel2()).getMean();
        if (isAbsolute()) {
            diff = Math.abs(diff);
        }
        return diff;
    }


}
